<template>
  <div class="search wrap-content">
    <div class="search-tt">
      搜索结果
    </div>
    <div class="search-content">
      <ul class="search-item"
          v-for="v,i in searchList">
        <li class="td search-item-img">
          <img :src="v.img"
               :alt="v.productName">
        </li>
        <li class="td search-item-tt">
          <div class="search-name">
            {{v.productName}}
          </div>
        </li>
        <li class="tdr search-item-sum">
          <div class="search-price">
            <span>
              ￥<i>{{v.price}}</i>/{{v.unit}}
            </span>
          </div>
        </li>
      </ul>
    </div>
  </div>
</template>


<script>
import { mapGetters } from 'vuex'
import { fetchOrderList } from '@/api/common'
import { getStore } from '@/utils/common'
import Clipboard from 'clipboard'
export default {
  data() {
    return {}
  },
  computed: {
    //computed用来监控自己定义的变量，该变量不在data里面声明，直接在computed里面定义，然后就可以在页面上进行双向数据绑定展示出结果或者用作其他处理；
    ...mapGetters(['searchList']),
  },
}
</script>

<style lang="scss" scoped>
@import '@/theme/mixin';
.search {
  margin-top: 30px;
  &-tt {
    height: 20px;
    font-family: PingFangSC-Semibold, PingFang SC;
    font-weight: 600;
    color: #0e1b2f;
    font-size: 16px;
    margin-bottom: 20px;
  }
  &-item {
    border-radius: 9px;
    border: 1px solid #c5c7cb;
    padding: 20px;
    box-sizing: content-box;
    margin-bottom: 20px;
    @include clearfix();
    .td {
      float: left;
      min-height: 60px;
      overflow: hidden;
    }
    .tdr {
      float: right;
      min-height: 60px;
      line-height: 60px;
      overflow: hidden;
    }
    &-img {
      img {
        display: block;
        width: 60px;
        height: 60px;
        border-radius: 3px;
      }
    }
    &-tt {
      width: 365px;
      font-size: 14px;
      color: $tt;
      margin-left: 20px;
    }
    &-amount {
      width: 150px;
      margin-left: 100px;
    }
    &-sum {
      width: 50px;
    }
  }
  &-name {
    font-size: 14px;
    color: #0e1b2f;
    margin-bottom: 5px;
  }
  &-time {
    font-size: 12px;
    color: #7f838a;
    margin-bottom: 12px;
  }
  &-time {
    font-size: 12px;
    color: #3e4651;
  }
  &-price {
    span {
      color: #d04a4a;
      font-size: 14px;
    }
    i {
      font-style: inherit;
      font-size: 16px;
    }
  }
  &-bottom {
    padding-bottom: 20px;
    border-bottom: 1px solid #dedede;
    @include clearfix();
  }

  .all-money {
    float: right;
    font-size: 20px;
    span {
      color: #d04a4a;
      font-size: 20px;
    }
    i {
      font-style: inherit;
      font-size: 30px;
    }
  }
  .cart-place {
    padding: 80px 0;
    @include clearfix();
  }

  .address-info {
    font-size: 16px;
    span {
      cursor: pointer;
      font-weight: 400;
      color: #1681f1;
    }
  }
  .place-btn {
    float: right;
    width: 130px;
    height: 40px;
    line-height: 40px;
    color: #fff;
    text-align: center;
    background: #d04a4a;
    border-radius: 6px;
    cursor: pointer;
  }
  .disable {
    background: #d2d4d6;
  }
  .copy-btn {
    cursor: pointer;
    color: #1880f1;
    text-decoration: initial;
  }
}
</style>